package com.mornd.gulimall.apis.product;

import com.mornd.gulimall.apis.product.fallback.ProductClientFallback;
import com.mornd.gulimall.apis.product.to.SkuInfoTo;
import com.mornd.gulimall.apis.product.to.SpuInfoTo;
import com.mornd.gulimall.common.core.result.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author: mornd
 * @dateTime: 2023/8/20 - 10:08
 */

@FeignClient(value = "service-product", fallback = ProductClientFallback.class)
public interface IProductClient {

    @GetMapping("/product/feign/getSkuInfoById")
    R<SkuInfoTo> getSkuInfoById(@RequestParam("skuId") Long skuId);

    @GetMapping("/product/feign/getSkuSaleStringlist")
    R<List<String>> getSkuSaleStringlist(@RequestParam("skuId") Long skuId);

    @GetMapping("/product/feign/getSpuInfo")
    R<SpuInfoTo> getSpuInfo(@RequestParam("spuId") Long spuId);
}
